Selecting an Input Source
This section discusses the video digitizer component functions that allow applications to select an input video source.
Some of these functions provide information about the available video inputs. Applications can use the
VDGetNumberOfInputs
function to determine the number of video inputs supported by the digitizer component. The
VDGetInputFormat
function allows applications to find out the video format (composite, s-video, or component) employed by a specified input.
You can use the
VDSetInput
function in your application to specify the input to be used by the digitizer component. The
VDGetInput
function returns the currently selected input.
The
VDSetInputStandard
function allows you to specify the video signaling standard to be used by the video digitizer component.
VDGetNumberOfInputs
The
VDGetNumberOfInputs
function returns the number of input video sources that a video digitizer component supports.
All video digitizer components must support this function.
pascal VideoDigitizerError VDGetNumberOfInputs
(VideoDigitizerComponent ci,
short *inputs);
-
ci
-
Specifies the video digitizer component for the request. Applications obtain this reference from the Component Manager's
OpenComponent
function.
-
inputs
-
Contains a pointer to an integer that is to receive the number of input video sources supported by the specified component. Video digitizer components number video sources sequentially, starting at 0. So, if a digitizer component supports two inputs, this function sets the field referred to by the
inputs
parameter to 1.
VDSetInput
The
VDSetInput
function allows applications to select the input video source for a video digitizer component.
All video digitizer components must support this function.
pascal VideoDigitizerError VDSetInput (VideoDigitizerComponent ci,
short input);
-
ci
-
Specifies the video digitizer component for the request. Applications obtain this reference from the Component Manager's
OpenComponent
function.
-
input
-
Specifies the input video source for this request. Video digitizer components number video sources sequentially, starting at 0. So, to request the first video source, an application sets this parameter to 0.
RESULT CODES
noErr
|
0
|
No error
|
qtParamErr
|
-2202
|
Invalid parameter value
|
SEE ALSO
Applications can get the number of video sources supported by a video digitizer component by calling the
VDGetNumberOfInputs
function (described in the previous section). Applications can get more information about a video source by calling the
VDGetInputFormat
function (described on
VDGetInputFormat
).
VDGetInput
The
VDGetInput
function returns data that identifies the currently active input video source.
All video digitizer components must support this function.
pascal VideoDigitizerError VDGetInput (VideoDigitizerComponent ci,
short *input);
-
ci
-
Specifies the video digitizer component for the request. Applications obtain this reference from the Component Manager's
OpenComponent
function.
-
input
-
Contains a pointer to a short integer that is to receive the identifier for the currently active input video source. Video digitizer components number video sources sequentially, starting at 0. So, if the first source is active, this function sets the field referred to by the
input
parameter to 0.
RESULT CODES
noErr
|
0
|
No error
|
qtParamErr
|
-2202
|
Invalid parameter value
|
VDGetInputFormat
The
VDGetInputFormat
function allows applications to determine the format of the video signal provided by a specified video input source.
pascal VideoDigitizerError VDGetInputFormat
(VideoDigitizerComponent ci,
short input, short *format);
-
ci
-
Specifies the video digitizer component for the request. Applications obtain this reference from the Component Manager's
OpenComponent
function.
-
input
-
Specifies the input video source for this request. Video digitizer components number video sources sequentially, starting at 0. So, to request information about the first video source, an application sets this parameter to 0. Applications can get the number of video sources supported by a video digitizer component by calling the
VDGetNumberOfInputs
function, discussed on
VDGetNumberOfInputs
.
-
format
-
Contains a pointer to a short integer that is to receive the specification of the video format of the specified input source. This function updates the field referred to by the
format
parameter. Valid values are
-
compositeIn
-
The input video signal is in composite format
-
sVideoIn
-
The input video signal is in s-video format
-
rgbComponentIn
-
The input video signal is in RGB component format
DESCRIPTION
Video digitizer components support three video formats: composite video, s-video, and component video (RGB signal).
All video digitizer components must support this function.
RESULT CODES
noErr
|
0
|
No error
|
qtParamErr
|
-2202
|
Invalid parameter value
|
VDSetInputStandard
The
VDSetInputStandard
function allows applications to specify the input signaling standard to digitize. Video digitizer components support three input signaling standards: NTSC, PAL, and SECAM.
pascal VideoDigitizerError VDSetInputStandard
(VideoDigitizerComponent ci,
short inputStandard);
-
ci
-
Specifies the video digitizer component for the request. Applications obtain this reference from the Component Manager's
OpenComponent
function.
-
inputStandard
-
A short integer that specifies the signaling standard used in the source video signal. Valid values are
-
ntscIn
-
Input video signal to digitize is in NTSC format
-
palIn
-
Input video signal to digitize is in PAL format
-
secamIn
-
Input video signal to digitize is in SECAM format
DESCRIPTION
Applications can use the
VDGetDigitizerInfo
function (described on
VDGetDigitizerInfo
) to determine the capabilities of a specified video digitizer component. Applications can use the
VDGetCurrentFlags
function (described on
VDGetCurrentFlags
) to determine the current input state of a digitizer component.
All video digitizer components must support this function.
SPECIAL CONSIDERATIONS
Your digitizer component should ensure that spatial characteristics that were set for one standard are not interpreted within another standard.
RESULT CODES
noErr
|
0
|
No error
|
qtParamErr
|
-2202
|
Invalid parameter value
|
© 1997 Apple Computer, Inc.Previous | Chapter Top | Chapter Contents | Next